<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>我的优惠券</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">

    <!--标准mui.css-->
    <link rel="stylesheet" href="__PUBLIC__/css/mui.min.css">
    <!--App自定义的css-->
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/app.css" />
    <script type="text/javascript" src="__PUBLIC__/js/jquery-3.2.1.min.js"></script>
</head>

<body class="bgf5">
<header class="mui-bar mui-bar-nav">
    <!--<a style="position:absolute;z-index: 2"  class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
    <a href="{:U('myMoney')}" style='position:absolute; z-index:3; width:40px; height:40px; left:0px; top:0px;background: blue;opacity:0'></a>-->
    <h1 class="mui-title">我的优惠券</h1>
    <a class="mui-r-span">使用规则</a>
</header>
<div class="mui-content">
    <foreach name="data" item="vo">
        <div class="mui-yh" name="{$vo.name}" jian="{$vo.amount}">
            <div class="mui-yh-left">
                <div>{$vo.name}</div>
                <div>有效期至{$vo.valdate}</div>
            </div>
            <div class="mui-yh-right">
                <span><em>￥</em><i>{$vo.amount}</i></span>
                <i class="quan">券</i>
            </div>
            <div class="yuan"></div>
        </div>
    </foreach>

    <!-- <div class="mui-yh ">
         <div class="mui-yh-left">
             <div>满100元使用</div>
             <div>有效期至2017-12-25</div>
         </div>
         <div class="mui-yh-right">
             <span><em>￥</em><i>10</i></span>
             <i class="quan">券</i>
         </div>
         <div class="yuan"></div>
     </div>
     <div class="mui-yh ">
         <div class="mui-yh-left">
             <div>满100元使用</div>
             <div>有效期至2017-12-25</div>
         </div>
         <div class="mui-yh-right">
             <span><em>￥</em><i>10</i></span>
             <i class="quan">券</i>
         </div>
         <div class="yuan"></div>
     </div>
     <div class="mui-yh ">
         <div class="mui-yh-left">
             <div>满100元使用</div>
             <div>有效期至2017-12-25</div>
         </div>
         <div class="mui-yh-right">
             <span><em>￥</em><i>10</i></span>
             <i class="quan">券</i>
         </div>
         <div class="yuan"></div>
     </div>
     <div class="mui-yh ">
         <div class="mui-yh-left">
             <div>满100元使用</div>
             <div>有效期至2017-12-25</div>
         </div>
         <div class="mui-yh-right">
             <span><em>￥</em><i>10</i></span>
             <i class="quan">券</i>
         </div>
         <div class="yuan"></div>
     </div>
     <div class="mui-yh ">
         <div class="mui-yh-left">
             <div>满100元使用</div>
             <div>有效期至2017-12-25</div>
         </div>
         <div class="mui-yh-right">
             <span><em>￥</em><i>10</i></span>
             <i class="quan">券</i>
         </div>
         <div class="yuan"></div>
     </div>-->

</div>



</body>

</html>
<script>
    $('.mui-yh').click(function () {
        var name = $(this).attr('name')
        var amount = $(this).attr('jian')
        parent.window.document.getElementById("mingxi").innerHTML = name;
        parent.window.document.getElementById("zhifu").innerHTML =  parseFloat(parent.window.document.getElementById("cangkufeiyong").innerHTML) - amount;
        parent.window.document.getElementById("jine").innerHTML =  parseFloat(parent.window.document.getElementById("cangkufeiyong").innerHTML) - amount;
        var index = parent.layer.getFrameIndex(window.name);
        parent.layer.close(index)
    })
</script>